<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			console.log(a);
			var a = 10;
			console.log(a);//10
			function (foo) {
				console.log("foo() a="+a);
				var a = 20;
				console.log("foo() a="+a);
			}
			foo();
			console.log("a="+a);
			
		</script>
	</body>
</html>
